package DailyQuestions;

import java.util.Scanner;

public class Day35_NianHuiChouJiang {
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        while(sc.hasNext()){
            int n=sc.nextInt();
            float res=(count(n)/multiply(n))*100;
            System.out.println(String.format("%.2f",res)+"%");
        }
        System.out.println(multiply(13));
        System.out.println(multiply2(13));
    }
    public static float count(int n){
        if(n==1){
            return 0;
        }
        if(n==2){
            return 1;
        }
        return (n-1)*(count(n-1)+count(n-2));
    }
    public static float multiply(int n){
        float res=1;
        for(int i=n;i>0;i--){
            res*=i;
        }
        return res;
    }
    public static float multiply2(int n){
       if(n==0){
           //0的阶乘等于1，不用多说吧
           return 1;
       }else{
           //阶乘表示，进行递归
           return n*multiply2(n-1);
       }
    }
}
